<?php
require_once $_site->get_viewpath("mobile/common/authcheck");
require_once $_site->get_viewpath("mobile/common/header");

$id=request('id',false,true);
if(!$id)return false;

//查询管理员信息
$admin_objet=new manager();
$pid=$admin_objet->admin_project_id();

$info=$admin_objet->record_info($id,$pid);

//绑定信息
$binfo=$admin_objet->bind_info($info['did'],'phone');
//项目名称
$pinfo=$admin_objet->project_info($info['pid'],'title');
//项目经理账号
$admininfo=$admin_objet->projecter_info($info['xid'],'name');


$truckType=array('a'=>'A 型','b'=>'B 型','c'=>'C 型');
$dustType=array('1'=>'Ⅰ类','2'=>'Ⅱ类','3'=>'Ⅲ 类');
$onloadType=array(1=>"空车",2=>"重车");
$stateType=array(1=>"有效",0=>"无效");
$typeAry=array(1=>'挖机装车 ',2=>'挖机计时',3=>'渣车登记');
?>	
</head>

	<body>
		<div class="headertwo clearfloat" id="header">
			<a href="javascript:history.go(-1)" class="fl box-s"><i class="iconfont icon-arrow-l fl"></i></a>
			<p class="fl">记录详情</p>			
			<a href="/mobile/center" class="fr"><i class="iconfont icon-gerenzhongxin fl"></i></a>
		</div>
		
		<!--分享内容-->		
		<div class="clearfloat" id="main">		
			<div class="service clearfloat">
				<div class="slider one-time">
					<div>
						<img src="<?php echo $info['img'];?>"/>
					</div>
				</div>
			</div>		
			
			<div class="service-top clearfloat box-s">			
				<div class="left fl clearfloat box-s">
					<p class="tit titwo"><?php echo $info['doper']?><span><?php echo $binfo['phone']?'('.$binfo['phone'].')':'';?></span></p>
					<p class="fu-tit"><?php echo '车型:'.$info['car_type'].' | 车牌: '.$info['dname'] ?></p>
				</div>
				<div class="right fl clearfloat">
				    <?php 
				        if($binfo){
				    ?>
				    <a href="tel:<?php echo $binfo['phone'];?>">
					<i class="mui-icon mui-icon-phone"></i>
					<p>拨打</p>
                    </a>						
					<?php 
					    }else{
					?>
					<i class="iconfont icon-gerenzhongxin"></i>
					<p>师傅</p>					
					<?php 
					    }
					?>
				</div>
			</div>
			
			<div class="service-ctent clearfloat">
				<div class="recom-tit clearfloat box-s">
		    		<p>记录信息</p>
		    	</div>
		    	<div class="service-list clearfloat box-s">
		    		<ul>
		    		    <?php 
		    		       if(1==$info['type']){
		    		    ?>
		    			<li>类型：<?php echo $typeAry[$info['type']];?></li>
		    			<li>设备号：<?php echo $info['dno']?></li>
		    			<li>产权人：<?php echo $info['downer']?></li>
		    			<li>车型：<?php echo $truckType[$info['truck']]?></li>
		    			<li>土石：<?php echo $dustType[$info['dust']]?></li>
		    			<li>时间：<?php echo date('Y-m-d H:i:s',$info['ctime']);?></li>
		    			<li>项目名称：<?php echo $pinfo['title'];?></li>
		    			<li>项目经理：<?php echo $admininfo['name'];?></li>
		    			<?php 
		    			   }elseif(3==$info['type']){
		    			?>
		    			<li>类型：<?php echo $typeAry[$info['type']];?></li>
		    			<li>设备号：<?php echo $info['dno']?></li>
		    			<li>产权人：<?php echo $info['downer']?></li>
		    			<li>线路：<?php echo $info['line']?></li>
		    			<li>挖机：<?php echo $info['wj_no']?></li>
		    			<li>时间：<?php echo date('Y-m-d H:i:s',$info['ctime']);?></li>
		    			<li>项目名称：<?php echo $pinfo['title'];?></li>
		    			<li>项目经理：<?php echo $admininfo['name'];?></li>		    					    			
		    			<?php 
		    			   }elseif(2==$info['type']){
		    			?>
		    			<li>类型：<?php echo $typeAry[$info['type']];?></li>
		    			<li>设备号：<?php echo $info['dno']?></li>
		    			<li>产权人：<?php echo $info['downer']?></li>
		    			<li>时间：<?php echo date('Y-m-d H:i:s',$info['ctime']);?></li>		    					    			
		    			<li>项目名称：<?php echo $pinfo['title'];?></li>
		    			<li>项目经理：<?php echo $admininfo['name'];?></li>			    			
		    			<?php 
		    			   }
		    			?>
		    		</ul>		    		
		    	</div>		    	
			</div>
	

		</div>
			
	</body>
	
</html>